<aside class="crayons-layout__sidebar-left p-3 pb-1 m:p-0 m:pb-0 grid gap-1 m:block">
  <h1 class="crayons-title mb-0 pl-0 m:pl-2 m:mb-6">
    <%= t("views.moderations.heading") %>
  </h1>

  <nav class="mod-center--nav" aria-label="Mod center inbox navigation">

    <div id="mod-center-inbox" class="mod-center--nav--medium hidden m:block">
      <a
        href="<%= "#{URL.url}/mod" %>"
        class="crayons-link crayons-link--block <%= "crayons-link--current" if @tag.blank? %> mb-2"
        data-tag-name="All topics">
        <%= t("views.moderations.aside.all") %>
      </a>
      <% if @current_user_tags.any? %>
        <h3 class="crayons-subtitle-3 mb-2 pl-2 hidden m:block">
          <%= t("views.moderations.aside.moderating_tags") %>
        </h3>
        <div class="tags-box">
          <% @current_user_tags.each do |tag| %>
            <a href="<%= "#{URL.url}/mod/#{tag}" %>" class="crayons-link crayons-link--block <%= "crayons-link--current" if tag == @tag&.name %>" data-tag-name="<%= tag %>">
              #<%= tag %>
              <span id="<%= tag %>-indicator" class="c-indicator"></span>
            </a>
          <% end %>
        </div>
      <% end %>
      <% if @current_user_following_tags.any? %>
        <h3 class="crayons-subtitle-3 mb-2 pl-2 hidden m:block">
          <%= t("views.moderations.aside.following_tags") %>
        </h3>
        <div class="tags-box">
          <% @current_user_following_tags.each do |tag| %>
            <a href="<%= "#{URL.url}/mod/#{tag}" %>" class="crayons-link crayons-link--block <%= "crayons-link--current" if tag == @tag&.name %>" data-tag-name="<%= tag %>">
              #<%= tag %>
              <span id="<%= tag %>-indicator" class="c-indicator"></span>
            </a>
          <% end %>
        </div>
      <% end %>
    </div>

    <div id="mod-center-inbox" class="mod-center--nav--default crayons-tabs crayons-tabs--scrollable flex m:hidden">
      <ul class="crayons-tabs__list">
        <li>
          <a
            data-text="All topics"
            href="<%= mod_path %>"
            class="crayons-tabs__item <%= "crayons-tabs__item--current" if @tag.blank? %>"
            aria-current="<%= "page" if @tag.blank? %>"
            data-tag-name="All topics">
            <%= t("views.moderations.aside.all") %>
          </a>
        </li>
        <% if @current_user_tags.any? %>
          <% @current_user_tags.each do |tag| %>
            <li>
              <a data-text="#<%= tag %>" href="<%= "#{mod_path}/#{tag}" %>" class="crayons-tabs__item <%= "crayons-tabs__item--current" if tag == @tag&.name %>" data-tag-name="<%= tag %>" aria-current="<%= "page" if tag == @tag&.name %>">
                #<%= tag %>
                <span id="<%= tag %>-indicator" class="c-indicator"></span>
              </a>
            </li>
          <% end %>
        <% end %>
      </ul>
    </div>
  </nav>

  <nav class="mod-center--nav hidden m:block" aria-label="Mod center resources navigation">
    <h3 class="crayons-subtitle-3 mb-2 pl-2">
      <%= t("views.moderations.aside.resources") %>
    </h3>
    <div id="mod-center-other-options">
      <a href="<%= URL.url %>/community-moderation" class="crayons-link crayons-link--block mod-center--nav__item">
        <%= t("views.moderations.aside.trusted") %>
        <%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
      </a>
      <a href="<%= URL.url %>/tag-moderation" class="crayons-link crayons-link--block mod-center--nav__item">
        <%= t("views.moderations.aside.tag") %>
        <%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
      </a>
      <a href="<%= URL.url %>/terms" class="crayons-link crayons-link--block mod-center--nav__item">
        <%= t("views.moderations.aside.terms_and_conditions") %>
        <%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
      </a>
      <a href="<%= URL.url %>/code-of-conduct" class="crayons-link crayons-link--block mod-center--nav__item">
        <%= t("views.moderations.aside.code_of_conduct") %>
        <%= crayons_icon_tag("external-link", title: t("views.moderations.aside.external")) %>
      </a>
    </div>
  </nav>
  <div class="fs-s mod-feedback">
    <span class="fw-medium">
      <%= t("views.moderations.aside.feedback.subtitle") %>
    </span>
    <span>
      <%= t("views.moderations.aside.feedback.description", email: ForemInstance.contact_email) %>
    </span>
  </div>
</aside>
